﻿
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="MenuManage.aspx.cs" Inherits="MenuManage" Title="菜单列表" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/MenuDetail.aspx">添加新菜单</asp:HyperLink><br />
    <asp:GridView ID="GridView1" runat="server" Height="200px" Width="100%" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" AllowPaging="True" CellPadding="3" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellSpacing="2" OnRowDataBound="GridView1_RowDataBound" DataKeyNames="Id">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="id" DataNavigateUrlFormatString="MenuDetail.aspx?id={0}"
                DataTextField="name" HeaderText="菜名" />
            <asp:BoundField DataField="Price" HeaderText="价格" SortExpression="Price" DataFormatString="{0:C}" />
            <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" Visible="False" />
            <asp:BoundField DataField="Unit" HeaderText="单位" SortExpression="Unit" />
            <asp:BoundField DataField="Code" HeaderText="编码" SortExpression="Code" />
            <asp:BoundField DataField="Type" HeaderText="菜系" SortExpression="Type" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
        <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
        <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
        <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetMenus"
        TypeName="BLL.MenuManager" DataObjectTypeName="Model.LMenu" DeleteMethod="Delete">
        <SelectParameters>
            <asp:Parameter DefaultValue="0" Name="language" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    
</asp:Content>

